import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {UIRiskCheckPlanItem} from "../../../entity/UIRiskCheckPlanItem";
import {Router} from "@angular/router";

@Component({
  selector: 'app-risk-check-item-list',
  templateUrl: 'risk-check-item-list.html',
  styleUrls: ['./risk-check-item-list.scss']
})
export class RiskCheckItemListComponent implements OnInit{

  @Input() values : UIRiskCheckPlanItem[] = [];
  @Output() detailFired : EventEmitter<UIRiskCheckPlanItem> = new EventEmitter<UIRiskCheckPlanItem>()

  constructor(protected _router: Router) { }

  ngOnInit() : void { }

  detail(v : UIRiskCheckPlanItem){
    //TODO pass proxy and let the detail page to request more details
    this.detailFired.emit(v)
  }
}
